<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"
	import="java.sql.*,java.io.*,java.util.*,com.telecom.cms.dto.*"%>

<%@ taglib uri="/WEB-INF/tlds/tree.tld" prefix="tree"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Insert title here</title>
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<script type="text/javascript" src="dtree.js"></script>
		<script>
function changeParent(tree,nodeId){
	aNodes = tree.aNodes;
	checked = document.getElementById(nodeId).checked;
	if(checked){
		for(var i=0;i<aNodes.length;i++){
			if(aNodes[i].id == aNodes[nodeId].pid){
				document.getElementById(i).checked = checked;
				changeParent(tree,i);
				break;
			}
		}
	}else{
  	sign = 0;
		for(var i=0;i<aNodes.length;i++){
			if(aNodes[i].pid == aNodes[nodeId].pid){
				if(document.getElementById(i).checked){
					sign = 1;
					break;
				}
			}
		}
		if(sign == 0){
			for(var i=0;i<aNodes.length;i++){
				if(aNodes[i].id == aNodes[nodeId].pid){
					document.getElementById(i).checked = checked;
					changeParent(tree,i);
					break;
				}
			}
		}
	}
}

function changeChild(tree,nodeId){
  aNodes = tree.aNodes;
	checked = document.getElementById(nodeId).checked;
	for(var i=0;i<aNodes.length;i++){
		if(aNodes[i].pid == aNodes[nodeId].id){
			document.getElementById(i).checked = checked;
			changeChild(tree,i);
		}
	}
}
</script>

	</head>
	<body>
		<form action="deal_current_bill.jsp" name="form_current_bill">


			<p>
		 		<input type="checkbox" name="current_bill_1" value="0-50">
				0-50
				<br>
				<br>
				<input type="checkbox" name="current_bill_2" value="50-100">
				50-100
				<br>
				<br>
				<input type="checkbox" name="current_bill_3" value="100-200">
				100-200
				<br>
				<br>
				<input type="checkbox" name="current_bill_4" value=">200">
				200以上
			</p>
			<p>
				<br>
				<input type="submit" name="Submit" value="提交">
				<br>
			</p>
				<script type="text/javascript">
				userAclModiTree = new dTree('userAclModiTree');
userAclModiTree.add("7","-100","<input type='checkbox' name='标准账目类型' id='0' value='7'>应用主题");
userAclModiTree.add("8","7","<input type='checkbox' name='标准账目类型' id='1' value='8' >应用主题");
userAclModiTree.add("9","7","<input type='checkbox' name='标准账目类型' id='2' value='9' >分群结果");
userAclModiTree.add("10","9","<input type='checkbox' name='标准账目类型' id='3' value='10'>公用分群结果");
userAclModiTree.add("11","9","<input type='checkbox' name='标准账目类型' id='4' value='11' >孝感电信");
userAclModiTree.add("12","11","<input type='checkbox' name='标准账目类型' id='5' value='12'>孝感电信结果1");
userAclModiTree.add("13","11","<input type='checkbox' name='标准账目类型' id='6' value='13'>孝感电信结果2");
document.write(userAclModiTree);
				
			</script>	
			<p>
				<br>
				<%
				out.println("试试看"+request.getSession().getAttribute("Name"));
				%>
				<input type="submit" name="Submit" value="提交">
				<br>
			</p>
		</form>
	</body>
</html>
